<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 

<div class="alert alert-success" role="alert"><h2>添加员工</h2></div>

<form>

  <div class="form-group">
    <label for="exampleInputPassword1"   class="col-sm-2 control-label">用户名</label>
    <input   class="form-control"  placeholder="用户名"  name="emp_name"  id="emp_name">
    
  </div>
   <div class="form-group">
    <label for="exampleInputPassword1"   class="col-sm-2 control-label">用户工资</label>
    <input   class="form-control"  placeholder="用户工资"  name="emp_sal"   id="emp_sal">
  </div>

<button type="button" class="btn btn-success"  id="tj" >提交</button>
 <button type="button" onclick="dlg.close();" class="btn btn-success">取消</button>
</form>

 <script>
      var tijiao;

      $('#tj').click(function(){
    	  $.ajax({
    		   url:'emp.do?operate=addEmp',
    		   method:'post',
    		    cache:false,
    			data:$("form").serialize(),
    			dataType:"json"
    	  }).done(function(msg){
    		  if(msg.msg=='1'){
    			  swal({
					  title: "添加成功",
					icon : "success",
				});
    			  dlg.close();
    			  aa();
    		  }else{
    			/*   swal({
					  title: "添加失败",
					icon : "failed",
				}); */
				//???????????
				/* .swal-footer {
					  background-color: rgb(245, 248, 250);
					  margin-top: 32px;
					  border-top: 1px solid #E9EEF1;
					  overflow: hidden;
					} */
    		  }
    		  
    	  });
      });
      
      </script>